using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace AgenciaEmpleo.Plantillas
{
    public partial class EtchedLine : UserControl
    {
        public EtchedLine()
        {
            InitializeComponent();
            //para que no reciba el foco
            SetStyle(ControlStyles.Selectable, false);

        }

        Color _darkColor = SystemColors.ControlDark;
        Color _lightColor = SystemColors.ControlLightLight;

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            Brush lightBrush = new SolidBrush(_lightColor);
            Brush darkBrush = new SolidBrush(_darkColor);
            Pen lightPen = new Pen(lightBrush, 1);
            Pen darkPen = new Pen(darkBrush, 1);

            e.Graphics.DrawLine(darkPen, 0, 0, this.Width, 0);
            e.Graphics.DrawLine(lightPen, 0, 1, this.Width, 1);
        }

        protected override void OnResize(EventArgs e)
        {
            base.OnResize(e);
            Refresh();
        }

        [Category("Apariencia")]
        Color DarkColor
        {

            get { return _darkColor; }

            set
            {
                _darkColor = value;
                Refresh();
            }
        }

        [Category("Apariencia")]
        Color LightColor
        {
            get { return _lightColor; }

            set
            {
                _lightColor = value;
                Refresh();
            }
        }
    }
}
